package com.lxyk.springcloud.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName CommonResult
 * @Description TODO
 * @Author FJQ
 * @Date 2022-03-11 20:49
 * @Version 1.0
 **/
//返回前端通用的JSON
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {

    private Integer code;
    private String message;
    private T data;    //泛型写什么就是什么

    public CommonResult(Integer code,String message){
        this(code,message,null);
    }

}